package com.bci.internal.engine.bcibpmengine.listener;


import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 多实例监听
 *
 * @author jzwu
 * @since 2021/3/25 0025
 */
public class MultInstancesStartListener implements ExecutionListener {
    private static final Logger LOGGER = LoggerFactory.getLogger(MultInstancesStartListener.class);

    @Override
    public void notify(DelegateExecution execution) {

        String instanceVariable = (String) execution.getVariable("instanceVariable");
        execution.setVariable("assigneeSelf", instanceVariable);
        LOGGER.info("instanceVariable = {}", instanceVariable);
    }
}